<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text" value="0" class="text">
    <input type="button" value="+1" class="button1">
    <input type="button" value="-1" class="button2">
</body>
<script>
    let butt1 = document.querySelector('.button1');
    let butt2 = document.querySelector('.button2');
    let text = document.querySelector('.text');
    butt1.onclick = function()
    {
        text.value = parseInt(text.value) + 1;
    }
    butt2.onclick = function()
    {
        text.value = parseInt(text.value) - 1;
    }
</script>
</html>